package hu.fic.weddingstorefinder.parcel;

import hu.fic.weddingstorefinder.db.table.Dress;
import hu.fic.weddingstorefinder.listadapter.ListItem;
import android.os.Parcel;
import android.os.Parcelable;

public class DressParcelable implements Parcelable, ListItem {
	
	private int customDressId;
	private String dressDesc;
	private String currency;
	private int price;
	private String imageName;
	private int customPOIId;
	private int dressStatus;
	private int isAvailable;
	
	public DressParcelable() {
		
	}
	
	public DressParcelable(Parcel in) {
		this.customDressId = in.readInt();
		this.dressDesc = in.readString();
		this.currency = in.readString();
		this.price = in.readInt();
		this.imageName = in.readString();
		this.customPOIId = in.readInt();
		this.dressStatus = in.readInt();
		this.isAvailable = in.readInt();
	}
	
	public DressParcelable(Dress dress) {
		this.customDressId = dress.getCustomDressId();
		this.dressDesc = dress.getDressDesc();
		this.currency = dress.getCurrency();
		this.price = dress.getPrice();
		this.imageName = dress.getImageName();
		this.customPOIId = dress.getCustomPOIId();
		this.dressStatus = dress.getDressStatus();
		this.isAvailable = dress.getIsAvailable();
	}
	
	@Override
	public int describeContents() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public void writeToParcel(Parcel parcel, int arg1) {
		parcel.writeInt(this.customDressId);
		parcel.writeString(this.dressDesc);
		parcel.writeString(this.currency);
		parcel.writeInt(this.price);
		parcel.writeString(this.imageName);
		parcel.writeInt(this.customPOIId);
		parcel.writeInt(this.dressStatus);
		parcel.writeInt(this.isAvailable);
	}
	
	public static final Parcelable.Creator<DressParcelable> CREATOR = new Parcelable.Creator<DressParcelable>() {
		 public DressParcelable createFromParcel(Parcel in) {
		     return new DressParcelable(in);
		 }
		
		 public DressParcelable[] newArray(int size) {
		     return new DressParcelable[size];
		 }
	};

	public int getCustomDressId() {
		return customDressId;
	}

	public void setCustomDressId(int customDressId) {
		this.customDressId = customDressId;
	}

	public String getDressDesc() {
		return dressDesc;
	}

	public void setDressDesc(String dressDesc) {
		this.dressDesc = dressDesc;
	}

	public String getCurrency() {
		return currency;
	}

	public void setCurrency(String currency) {
		this.currency = currency;
	}

	public int getPrice() {
		return price;
	}

	public void setPrice(int price) {
		this.price = price;
	}

	public String getImageName() {
		return imageName;
	}

	public void setImageName(String imageName) {
		this.imageName = imageName;
	}

	public int getCustomPOIId() {
		return customPOIId;
	}

	public void setCustomPOIId(int customPOIId) {
		this.customPOIId = customPOIId;
	}

	public int getDressStatus() {
		return dressStatus;
	}

	public void setDressStatus(int dressStatus) {
		this.dressStatus = dressStatus;
	}

	public int getIsAvailable() {
		return isAvailable;
	}

	public void setIsAvailable(int isAvailable) {
		this.isAvailable = isAvailable;
	}

	@Override
	public boolean isSection() {
		return false;
	}

}
